//
//  LiveListTableViewCell.m
//  BaseProject
//
//  Created by hundredsandc on 2017/10/27.
//  Copyright © 2017年 hundredsandc. All rights reserved.
//

#import "LiveListTableViewCell.h"
#import "UIImageView+WebCache.h"
#import "UIView+Addtions.h"
#import "LiveListViewController.h"

@interface LiveListTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *LiveImageView;

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

@end
@implementation LiveListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)customImageUrlStr:(NSString *)urlStr title:(NSString *)str time:(NSString *)time commentatorStr:(NSString *)commentatorStr{
    [_LiveImageView sd_setImageWithURL:[NSURL URLWithString:urlStr]];
    _titleLabel.text = str;
    _timeLabel.text = time;
    
    if (commentatorStr.length>0) {
        
        
        UIImageView *juxing = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-15-130, 5,130, 23)];
        juxing.image = [UIImage imageNamed:@"yuanjiaojuxing"];
        
        UIImageView *yuan = [[UIImageView alloc]initWithFrame:CGRectMake(10,(23-6)/2, 6, 6)];
        yuan.image = [UIImage imageNamed:@"huangdian"];
        
        [_LiveImageView addSubview:juxing];
        [juxing addSubview:yuan];
        
        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(21, 0, 115, 23)];
        label.text = commentatorStr;
        label.font = FONT(12);
        label.textColor = [UIColor whiteColor];
        label.textAlignment = NSTextAlignmentCenter;
        [juxing addSubview:label];
    }
}

@end
